package com.tanhua.server.exception;

/**
 * @Author: cl
 * @Date: 2022/5/2 - 05 - 02
 * @Description:
 */

import lombok.Data;
import com.tanhua.model.vo.ErrorResult;

/**
 * 自定义异常配置类
 */
@Data
public class BusinessException extends RuntimeException {
    //引入异常结果信息类
    private ErrorResult errorResult;

    //通过有参构造传递
    public BusinessException(ErrorResult errorResult) {
        super(errorResult.getErrMessage());
        this.errorResult = errorResult;
    }
}
